package com.ph.website.home.controller;

import com.ph.website.home.base.common.CommonResult;
import com.ph.website.home.param.AddressParam;
import com.ph.website.home.service.IAddressService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.validation.Valid;

@RestController
@RequestMapping("/api/address")
public class AddressController {

    @Resource
    private IAddressService addressService;

    /**获取公司地址*/
    @RequestMapping("/get")
    public CommonResult get(){
        return addressService.get();
    }

    /**设置公司地址*/
    @RequestMapping("/set")
    public CommonResult set(@Valid AddressParam.SetParam param){
        return addressService.set(param);
    }
}
